package com.example.demo.controller;

import com.example.demo.entity.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserController  extends BasiaController{
    @Autowired
    private UserService userService;
    @RequestMapping("/hello")
    public String hello(){
        return "hello1";
    }
    @RequestMapping("/getAll")
    public List<User> getAll(){
        return userService.getAll();
    }
    @GetMapping("/getRedis")
    public void  getRedis(){
        userService.getRedis();
    }

}
